package com.hmusic.mymusic.service.impl;

import com.hmusic.mymusic.dao.AdminMapper;
import com.hmusic.mymusic.domain.Admin;
import com.hmusic.mymusic.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 管理员service实现类
 */
@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;


    /**
     * 验证密码是否正确
     *
     * @param admin
     */
    @Override
    public boolean verifyPassword(Admin admin) {
        Admin admin1 = adminMapper.verifyPassword(admin);
        if (admin1 != null){
            return true;
        }else{
            return false;
        }
    }
}
